home *** CD-ROM | disk | FTP | other *** search
/ Sound Fx / Sound Fx.iso / Software / UNZIPED / MPW181-5 / _SETUP.1 / mci_obuf.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-04-21  |  1.0 KB  |  57 lines

  1. /* mci_obuf.h
  2.  
  3.    Obuffer implementation for Win32. Written by Jeff Tsay. */
  4.  
  5. #ifndef MCI_OBUF_H
  6. #define MCI_OBUF_H
  7.  
  8. #ifdef  __WIN32__
  9. #define STRICT
  10. #include <windows.h>
  11.  
  12. #include "all.h"
  13. #include "header.h"
  14. #include "args.h"
  15. #include "obuffer.h"
  16.  
  17. #define TWO_TIMES   5
  18. static const uint32 BUFFERSIZE = OBUFFERSIZE << TWO_TIMES;
  19. #define BIT_SELECT  0x1f
  20.  
  21. #define SLEEPTIME   20
  22.  
  23. // MCIbuffer class written by Jeff Tsay
  24.  
  25. class MCIbuffer : public Obuffer
  26. {
  27. private:
  28.   uint32 bufferp[MAXCHANNELS];
  29.   uint32 channels;
  30.   tWAVEFORMATEX *lpwf;
  31.   LPWAVEHDR* lpwavehdr_arr;
  32.   HWAVEOUT *phwo;
  33.   uint32 buffer_count;
  34.   uint32 hdr_size;
  35.   uint32 fillup;
  36.   DWORD data_size;
  37.   uint32 user_stop;
  38.  
  39. public:
  40.     MCIbuffer(uint32 number_of_channels, MPEG_Args *maplay_args);
  41.     ~MCIbuffer();
  42.  
  43.   void    append(uint32 channel, int16 value);
  44.   void    write_buffer(int32 fd);
  45.  
  46. #ifdef SEEK_STOP
  47.   void   clear_buffer();
  48.   void   set_stop_flag();
  49. #endif
  50.  
  51. private:
  52.   void   wave_swap();
  53. };
  54.  
  55. #endif // __WIN32__
  56. #endif // MCI_OBUFFER_H
  57.